<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<%@ include file="/web/header.jsp"%>
<title>主界面</title>
</head>
<body>
<!-- http://127.0.0.1:8080/demo220111/web/page/main.jsp -->
<div class="layui-layout layui-layout-admin">
  <div class="layui-header">
    <div class="layui-logo layui-hide-xs layui-bg-black">bx企业管理系统</div>
    <!-- 头部区域（可配合layui 已有的水平导航） -->
    <ul class="layui-nav layui-layout-left">
      <!-- 移动端显示 -->
      <li class="layui-nav-item layui-show-xs-inline-block layui-hide-sm" lay-header-event="menuLeft">
        <i class="layui-icon layui-icon-spread-left"></i>
      </li>
      
      <li class="layui-nav-item layui-hide-xs"><a href="">部门信息</a></li>
      <li class="layui-nav-item layui-hide-xs"><a href="">员工信息</a></li>
      <li class="layui-nav-item layui-hide-xs"><a href="">项目信息</a></li>
      <li class="layui-nav-item layui-hide-xs"><a href="">绩效信息</a></li>
      <li class="layui-nav-item">
        <a href="javascript:;">信息查询</a>
        <dl class="layui-nav-child">
          <dd><a href="">部门信息</a></dd>
          <dd><a href="">员工信息</a></dd>
          <dd><a href="">项目信息</a></dd>
          <dd><a href="">绩效信息</a></dd>
        </dl>
      </li>
    </ul>
    <ul class="layui-nav layui-layout-right">
      <li class="layui-nav-item layui-hide layui-show-md-inline-block">
        <a href="javascript:;">
          <img src="<%=app %>/web/base/img/fei.png" class="layui-nav-img">
          用户[${user.name}]
        </a>
        <dl class="layui-nav-child">
          <dd><a href="">修改资料</a></dd>
          <dd><a href="">修改密码</a></dd>
        </dl>
      </li>
      <li class="layui-nav-item">
      	<a href="javascript:toLogout()">退出</a>
      </li>
      <li class="layui-nav-item" lay-header-event="menuRight" lay-unselect>
        <a href="javascript:openRight();">
          <i class="layui-icon layui-icon-more-vertical"></i>
        </a>
      </li>
    </ul>
  </div>
  
  <div class="layui-side layui-bg-black">
    <div class="layui-side-scroll">
      <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
      <ul class="layui-nav layui-nav-tree" lay-filter="test">
        <li class="layui-nav-item layui-nav-itemed">
          <a class="" href="javascript:;">信息维护</a>
          <dl class="layui-nav-child">
            <dd><a href="javascript:;" data-url="/web/page/department/list.jsp" class="site-demo-active">部门信息维护</a></dd>
            <dd><a href="javascript:;" data-url="/web/page/employee/list.jsp" class="site-demo-active">员工信息维护</a></dd>
            <dd><a href="javascript:;" data-url="/web/page/project/list.jsp" class="site-demo-active">项目信息维护</a></dd>
            <dd><a href="javascript:;" data-url="/web/page/score/list.jsp" class="site-demo-active">绩效信息维护</a></dd>
          </dl>
        </li>
        <li class="layui-nav-item">
          <a href="javascript:;">小工具menu group 2</a>
          <dl class="layui-nav-child">
            <!-- <dd><a href="javascript:openUrl('/web/page/department/list.jsp');">天气</a></dd>
            <dd><a href="javascript:;">日历</a></dd>
            <dd><a href="">站长工具超链接</a></dd> -->
            <dd><a href="javascript:openUrl('https://www.baidu.com');">百度一下</a></dd>
            <dd><a href="https://wannianrili.bmcx.com/">日历</a></dd>
            <dd><a href="https://tool.chinaz.com/">站长工具</a></dd>
          </dl>
        </li>
        <li class="layui-nav-item"><a href="http://www.weather.com.cn/forecast/">天气</a></li>
        <li class="layui-nav-item"><a href="https://cn.bing.com/">bing查询</a></li>
<!--         <li class="layui-nav-item"><a href="javascript:;">click menu item</a></li>
        <li class="layui-nav-item"><a href="">the links</a></li> -->
      </ul>
    </div>
  </div>
  
  <div class="layui-body">
  	<iframe name="frameA" width="99%" height="97%"></iframe>
  </div>
  
  <div class="layui-footer">@ wendy.buzz -- 用心做好每一个产品</div>
</div>
<script type="text/javascript">
	$('.site-demo-active').click(function(){
		window.open(base.app + $(this).data("url"),'frameA')
	})
	function openUrl(url){
		window.open(base.app + url,'frameA')
	}
	$('.layui-nav-tree .site-demo-active:first').addClass("layui-this").click()
	function toLogout(){
		console.log(123)
		layerConfirm(function(){
			toHref('/EmployeeServlet?action=logout')
		},"是否退出?")
	}
	function initImage(){
		var image='${user.image}';
		image=image?"/image/"+image:base.app+"/web/base/image/preview.jpg";
		$(".layui-nav-img").attr('src',image);
	}
	
	function openRight(){
		layer.open({
			type:1,
			content:'<div style="padding:15px;">处理右侧面板的操作</div>',
			area:['260px','100%'],
			offset:'rt', //右上角
			anim:5,
			shadeCkose:true
		});
	}
</script>
</body>
</html>




